package com.xbenben.demoroot;

import com.alibaba.fastjson.JSONObject;
import com.xbenben.demoroot.bean.YmlProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@EnableAsync
public class DemoRootApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(DemoRootApplication.class, args);
    }

    @Autowired
    private YmlProperty ymlProperty;

    @Autowired
    private YmlProperty2 ymlProperty2;
    @Override
    public void run(String... args) throws Exception {
        // System.out.println(JSONObject.toJSONString(ymlProperty));

        System.out.println(JSONObject.toJSONString(ymlProperty2));

    }



}
